<?php
if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip'))
    ob_start("ob_gzhandler");
else
    ob_start();
session_start();

include("includes/config.inc.php");
include("includes/functions.inc.php");
include("includes/classes/Counter.php");
include("includes/classes/Text.php");
include("includes/classes/Adminsession.php");

$counter = new Counter;
$counter->db = $db;
$visitors_complete = $counter->count();

$menu = array(
    'Startseite'        => '?site=index',
    'Neuigkeiten'        => '?site=news',
    'Preisliste'        => '?site=prices',
    'Galerie'            => '?site=galerie',
    'Wegbeschreibung'    => '?site=route',
    '&Uuml;ber mich'    => '?site=about_me',
    'Impressum'            => '?site=imprint'
);

$keyword_array = explode(",", $keywords);
shuffle($keyword_array);

$text = new Text;
$text->db = $db;

$text->viewPart = "header_address";
$smarty->assign("header_address_text", $text->getText());

$text->viewPart = "header_email_tel";
$smarty->assign("header_email_tel_text", $text->getText());

$smarty->assign("menu", $menu);

$smarty->assign("from_site", $_GET['site']);

$smarty->assign("AUTHENTICATED", false);
if (isset($_SESSION['admin'])) {
    $smarty->assign("AUTHENTICATED", true);
    $smarty->assign("admin_name", $_SESSION['admin']);
}

$smarty->display("general/header.tpl");
?>